@import './common.scss';
@import './variables.scss';
@import './tools.scss';
@import './scroll.scss';
@import './markdown.scss';

html {
    font-size: 12px;
    font-family: -apple-system, system-ui,
        BlinkMacSystemFont, Helvetica Neue, PingFang SC,
        Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
    word-break: break-word;
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--background-g);
    color: var(--text-0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#home {
    display: block;
}

#header {
    position: relative;
    &::after {
        content: '';
        height: 54px;
        background: var(--background-w);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        position: absolute;
        width: 100vw;
        top: 0;
        left: 0;
        z-index: -1;
    }
    position: fixed;
    top: 0;
    width: 80%;
    padding-left: 21vw;
    height: 54px;
    z-index: 10;
    #custom-github {
        padding: 0 15.822px;
    }
    #blogTitle {
        display: none;
        // #lnkBlogLogo,
        // h1,
        // h2 {
        //     display: none;
        // }
    }
    #navigator {
        @include center();
        height: 100%;
        color: var(--text-3);
        a {
            position: relative;
        }
        .blogStats {
            position: absolute;
            top: 0;
            right: 7.2vw;
            display: flex;
            height: 100%;
            font-size: 12px;
            color: var(--text-9);
            span {
                @include center();
                padding: 0 15.822px;
            }
        }
        #navList {
            display: flex;
            height: auto;
            li a {
                @include center();
                height: 100%;
                font-weight: 700;
                text-shadow: 5px 0 10px var(--themeColor);
                padding: 0 15.822px;
                &:hover {
                    background-color: var(--themeColor);
                    color: #fff;
                    transition: all 0.3s;
                }
            }
        }
    }
}

#main {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding-top: 64.8px;
    justify-content: center;
}

#mainContent {
    margin: 0 1vw;
    width: 54vw;
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background-color: var(--background-w);
}

.forFlow {
    // 首页
    .day {
        .dayTitle {
            border-bottom: 1px solid hsla(0, 0%, 59.2%, 0.1);
            padding: 14.418px;
            color: var(--text-4);
            font-size: 16px;
            &:not(:first-of-type) {
                border-top: 1px solid
                    hsla(0, 0%, 59.2%, 0.1);
            }
        }
        .postTitle {
            margin-top: 5px;
            padding-left: 10.8px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-weight: 700;
            font-size: 16px;
            text-shadow: 5px 0px 10px var(--themeColor);
            color: var(--text-3);
            &:hover {
                transform: translateX(5.4px);
                transition: all 0.2s;
            }
        }
        .postCon {
            padding: 5.4px 14.418px;
            color: var(--text-5);
            .c_b_p_desc {
                font-size: 14px;
                color: var(--text-5);
                .c_b_p_desc_readmore {
                    display: table;
                    margin-top: 5.4px;
                    padding: 2.7px 5.4px 2.7px 8.1px;
                    border: 1px solid var(--themeColor);
                    font-size: 14px;
                    color: var(--themeColor);
                    border-radius: 3px;
                }
            }
        }
        .postDesc {
            display: flex;
            justify-content: flex-end;
            align-items: baseline;
            text-transform: uppercase;
            padding: 5.4px 14.418px;
            color: var(--text-9);
            a:last-child {
                margin-left: 8.1px;
            }
        }
    }
    // 随笔分类 | 随笔档案 | 文章档案
    .entrylist {
        .entrylistTitle {
            border-bottom: 1px solid hsla(0, 0%, 59.2%, 0.1);
            padding: 14.418px;
            color: var(--text-4);
            font-size: 16px;
            &:not(:first-of-type) {
                border-top: 1px solid
                    hsla(0, 0%, 59.2%, 0.1);
            }
        }
        .entrylistItem {
            .entrylistPosttitle {
                padding: 5.4px 14.418px;
                @include text-over();
                font-weight: 700;
                font-size: 16px;
                text-shadow: 5px 0px 10px var(--themeColor);
                color: var(--text-3);
                // .entrylistItemTitle {
                // }
                &:hover {
                    transform: translateX(5.4px);
                    transition: all 0.2s;
                }
            }
            .entrylistPostSummary {
                .c_b_p_desc {
                    color: var(--text-5);
                    .c_b_p_desc_readmore {
                        display: table;
                        margin-top: 5.4px;
                        padding: 2.7px 5.4px 2.7px 8.1px;
                        border: 1px solid var(--themeColor);
                        color: var(--themeColor);
                        border-radius: 3px;
                    }
                }
            }
            .entrylistItemPostDesc {
                padding: 5.4px 14.418px;
                color: var(--text-9);
            }
        }
    }
    // 相册页、标签页
    .custom-gallery h3,
    .PostListTitle {
        border-bottom: 1px solid hsla(0, 0%, 59.2%, 0.1);
        padding: 1rem;
        color: var(--text-4);
        font-size: 16px;
    }
    // 我的标签
    #taglist_main {
        margin-top: 0;
        padding: 0 10px 10px;
        #taglist_title_wrap {
            border-bottom: 1px solid hsla(0, 0%, 59.2%, 0.1);
            h3 {
                margin: 0;
                padding: 10px;
            }
        }
        #taglist {
            padding: 10px 0;
            table {
                display: block;
            }
            tbody {
                display: flex;
                flex-wrap: wrap;
                tr {
                    display: flex;
                    flex-wrap: wrap;
                    width: 100%;
                    td {
                        margin: 5px;
                        padding: 2px 8px;
                        border-radius: 5px;
                        color: #fff;
                        font-size: 14px;
                        font-weight: 700;
                        flex-grow: 1;
                        text-align: center;
                        &:nth-child(n) {
                            background-color: #ff6b6b;
                        }
                        &:nth-child(2n) {
                            background-color: #10ac84;
                        }
                        &:nth-child(3n) {
                            background-color: #ff9f43;
                        }
                        &:nth-child(4n) {
                            background-color: #2e86de;
                        }
                        &:hover {
                            transform: scale(1.05);
                            box-shadow: 0 0 5px
                                var(--themeColor);
                            transition: all 0.2s;
                        }
                    }
                }
            }
        }
    }
    // 随笔页
    #post_detail {
        font-size: 16px;
        padding: 21.6px 21.6px 0;
        #topics {
            .post {
                .postTitle {
                    margin: 20px 0;
                    // padding: 14.418px 5.4px;
                    font-size: 24px;
                    color: var(--text-3);
                }
                // .postBody {
                // }
                .postDesc {
                    padding: 5.4px 0;
                    margin-bottom: 21.6px;
                    font-size: 14px;
                    color: var(--text-9);
                    // text-align: center;
                }
            }
        }
    }
}

// 评论列表
#blog-comments-placeholder {
    margin: 0 21.6px;
    border-radius: 3px;
    .feedback_area_title {
        padding: 7.56px 10.8px;
        border: 1px solid var(--text-10);
        background-color: var(--background-e);
        border-radius: 2px 2px 0 0;
        font-size: 12px;
        font-weight: 700;
        color: var(--text-3);
    }
    .feedbackItem {
        border-left: 1px solid var(--text-10);
        border-right: 1px solid var(--text-10);
        padding: 17.982px 10.8px;
        &:nth-last-child(2) {
            border-bottom: 1px solid var(--text-10);
        }
    }
    .feedbackCon {
        @include center();
        margin-top: 5px;
        .blog_comment_body {
            position: relative;
            margin-left: 10px;
            margin-top: 5.4px;
            padding: 0 10.8px;
            background-color: var(--background-e);
            border-radius: 3px;
            color: var(--text-3);
            font-size: 14px;
            max-width: 540px;
            line-height: 1.6;
            padding: 5.4px 10.8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            &:before {
                content: '';
                display: block;
                position: absolute;
                left: -24.84px;
                top: 5.4px;
                width: 12.258px;
                height: 0;
                border-right: solid 12.96px
                    var(--background-e);
                border-top: solid 3.24px rgba(0, 0, 0, 0);
                border-bottom: solid 7.182px
                    rgba(0, 0, 0, 0);
            }
        }
    }
    .custom-comments-author {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        .louzhu {
            color: var(--themeColor);
        }
        .blog_comment_body {
            a:not(:nth-child(1)):hover {
                color: var(--themeColor);
                transition: all 0.25s;
            }
            &::before {
                display: none;
            }
            &::after {
                content: '';
                display: block;
                position: absolute;
                right: -24.84px;
                top: 5.4px;
                width: 12.258px;
                height: 0;
                border-left: solid 12.96px
                    var(--background-e);
                border-top: solid 3.24px rgba(0, 0, 0, 0);
                border-bottom: solid 7.182px
                    rgba(0, 0, 0, 0);
            }
        }

        img {
            margin-left: 10.8px;
        }

        .feedbackManage {
            order: 0;
        }
        .layer {
            margin-left: 5.4px;
            order: 3 !important;
        }
        .comment_vote {
            order: -3;
        }
        .comment_date {
            order: -1 !important;
        }
        .feedbackManage {
            order: -2 !important;
        }
        .feedbackCon {
            flex-direction: row-reverse;
            .blog_comment_body {
                img {
                    width: 27px;
                    height: 27px;
                    vertical-align: middle;
                }
            }
            br {
                display: none;
            }
        }
    }
    br {
        display: none;
    }
    .layer {
        padding: 0 5.4px;
        color: var(--text-a);
        background-color: var(--themeColor);
        border-radius: 3px;
        margin-right: 5.4px;
        order: 0;
    }
    .comment_date {
        margin: 0 5.4px;
        order: 2;
    }
}

// 发表评论
#comment_form {
    margin: 21.6px;
    #divCommentShow,
    #ad_text_under_commentbox,
    #comment_nav {
        display: none;
    }
    #comment_form_container {
        position: relative;
        border: 1px solid var(--text-10);
        border-radius: 3px;
        & > p:nth-of-type(3),
        & > a:first-of-type {
            display: none;
        }
        & > p:last-of-type {
            color: var(--text-9);
            margin-left: 10.8px;
            font-size: 14px;
        }
        #commentform_title {
            // padding: 10px 0;
            // border-bottom: 1px solid var(--text-10);
            background: none;
            // font-weight: 700;
            margin-bottom: 0;
            padding: 7.56px 10.8px;
            border-bottom: 1px solid var(--text-10);
            background-color: var(--background-e);
            border-radius: 2px 2px 0 0;
            font-size: 12px;
            font-weight: 700;
            color: var(--text-3);
        }
        // #tip_comment {
        // }

        .comment_textarea {
            width: 100%;
            border-color: var(--text-9);
            background: none;
            border: none;
            .commentbox_title {
                border-bottom-color: var(--themeColor);
            }
            .commentbox_title_left {
                display: none;
            }
            // .commentbox_title_right {
            // }
            #tbCommentBody {
                margin-bottom: 10.8px !important;
                height: 81px;
                min-height: 135px;
                color: var(--text-5);
                background: none;
                font-size: 16px;
                border-bottom: 1px dashed #999;
                &:hover {
                    border-bottom-color: var(--themeColor);
                }
            }
            // #tbCommentBodyPreview {
            // }
            // #commentbox_footer {
            // }
        }
        #commentbox_opt {
            & > a {
                display: none;
            }
            #btn_comment_submit {
                position: absolute;
                bottom: 10.8px;
                right: 10.8px;
                width: 75.6px;
                height: 32.4px;
                color: #fff;
                font-weight: 700;
                border-radius: 4px;
                border: none;
                background-color: #00a1d6;
                user-select: none;
                outline: none;
                cursor: pointer;
                font-size: 12px;
                &:hover {
                    box-shadow: 0 1px 6px #00a1d6;
                    transition: background-color 0.3s;
                }
                &:active {
                    filter: brightness(0.8);
                    transition: background-color 0.3s;
                }
            }
        }
        #tip_comment2 {
            display: none;
        }
    }
}

// 侧边栏 start
#sideBar {
    width: 15.5vw;
    font-size: 14px;
    overflow: hidden;
}

#blog-calendar,
#sidebar_news,
.sidebar-block {
    background-color: var(--background-w);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border-radius: 2px;
    margin-bottom: 16.2px;
    color: var(--text-3);

    h3 {
        padding: 10px 14px;
        font-weight: 700;
        font-size: 1.1em;
        border-bottom: 1px solid hsla(0, 0%, 59.2%, 0.1);
    }

    #blog-news,
    #sidebar_search_box,
    ul {
        padding: 10px 14px;
        li {
            padding-top: 5.4px;
            &:hover {
                transform: translateX(5px);
                transition: all 0.2s;
            }
        }
    }
}

#sidebar_scorerank {
    ul li {
        transform: none;
    }
}

#sidebar_recentcomments {
    .recent_comment_body {
        padding: 1rem;
        background-color: var(--background-e);
        border-radius: 3px;
    }
    ul li:hover {
        transform: none;
    }
}

#blog-calendar {
    padding: 10px 14px;
    #blogCalendar {
        table,
        tbody,
        tr,
        td {
            display: block;
        }
        tr {
            &:nth-child(1) {
                tr {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;
                }
                // .CalNextPrev {
                //     a {
                //         color: var(--themeColor);
                //         &:hover {
                //             color: #00a1d6;
                //         }
                //     }
                // }
            }
            &:nth-child(2) {
                margin: 10.098px 0 5.4px;
                padding: 0 3.24px;
            }
            &:not(:nth-child(1)) {
                display: flex;
                justify-content: space-between;
                td {
                    @include center(all);
                    width: 21.6px;
                    height: 21.6px;
                }
            }
        }
        .CalTodayDay {
            color: var(--themeColor);
        }
    }
}

#sidebar_search {
    .input_my_zzk {
        padding: 0 3px;
        border: 1px solid var(--themeColor);
        background: var(--background-w);
        outline: none;
        color: var(--text-3);
    }
    .btn_my_zzk {
        border: none;
        background: var(--themeColor);
        color: #fff;
        outline: none;
        &:hover {
            background: #ef98b5;
            transition: background 0.3s;
        }
    }
}

// #sidebar_recentcomments
.recent_comment_title,
#sidebar_recentposts ul li {
    @include text-over();
}

// #blog-news {
//     @include center();
//     #profile_block {
//         margin-top: 0;
//     }
// }

// 侧边栏 end
.PostList {
    margin-left: 0;
    padding: 5.4px 14.418px;
}

#cnblogs_post_body {
    &:after {
        content: '——— EOF ———';
        display: block;
        margin: 21.6px auto;
        text-align: center;
        color: var(--text-9);
    }
}

#blog_post_info_block {
    @include center(h);
    flex-direction: column;
    margin: 0;
    #BlogPostCategory {
        margin-bottom: 5.4px;
        font-size: 16px;
        order: 1;
    }
    #EntryTag {
        margin-bottom: 5.4px;
        font-size: 16px;
        order: 2;
    }
    #blog_post_info {
        order: 3;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        align-items: baseline;
        margin: 21.6px 0 10.8px;
        #green_channel {
            @include center();
            flex-wrap: wrap;
            margin: 0;
            padding: 0;
            width: auto;
            border: none;
            a,
            span {
                background: none;
                font-size: 14px;
                border-radius: 3px;
                box-shadow: none;
                font-weight: 700;
                text-shadow: none;
            }
            a {
                &:nth-child(1),
                &:nth-child(2),
                &:nth-child(3) {
                    padding: 4px 10px;
                    &:hover {
                        box-shadow: 0 0 5px #999;

                        transition: all 0.2s;
                    }
                    &:active {
                        filter: brightness(0.8);
                    }
                }
                &:nth-child(1) {
                    background-color: #ff6b81;
                }
                &:nth-child(2) {
                    background-color: #0984e3;
                }
                &:nth-child(3) {
                    background-color: #ffa502;
                }
            }
            #green_channel_weibo,
            #green_channel_wechat {
                background: none;
                img {
                    width: 24px;
                    height: 24px;
                    margin-left: 0;
                }
            }
            #green_channel_weibo {
                margin-left: 21.6px;
            }
            #green_channel_wechat {
                margin-right: 21.6px;
            }
        }
        #author_profile {
            @include center();
            margin: 0 10.8px 0 0;
            padding: 0;
            width: auto;
            order: -1;
            #author_profile_info {
                display: none;
                // #author_profile_detail {
                // }
            }
            // #author_profile_honor {
            // }
            #author_profile_follow {
                display: none;
            }
        }
        #div_digg {
            @include center();
            margin: 0;
            padding: 0;
            .diggit,
            .buryit {
                width: auto;
                height: auto;
                margin-top: 0;
                padding: 4px 10px;
                background: none;
                background-color: var(--themeColor);
                border-radius: 3px;
                font-size: 14px;
                span {
                    color: #fff;
                }
                .diggnum,
                .burynum {
                    line-height: 1em !important;
                }
            }
            .diggit {
                background-color: #ff6b81;
                &:hover {
                    box-shadow: 0 0 5px #ff6b81;
                    transition: all 0.2s;
                }
                &:active {
                    filter: brightness(0.8);
                }
            }
            .buryit {
                margin-left: 10.8px;
                background-color: #ced6e0;
                &:hover {
                    box-shadow: 0 0 5px #ced6e0;
                    filter: brightness(0.8);
                    transition: all 0.2s;
                }
            }
            .diggit::before {
                content: '👍';
            }
            .buryit::before {
                content: '👎';
            }
            .diggword {
                display: none;
            }
        }
    }
    #post_next_prev {
        order: 3;
        margin-top: 21.6px;
        font-size: 16px;
        color: var(--text-9);
        a:nth-child(3n + 1) {
            display: none;
        }
    }
}

.postDesc2 {
    color: var(--text-9);
    margin-top: 5.4px;
}

.entrylistPostSummary {
    padding: 5.4px 14.418px;
    color: var(--text-5);
}

#myposts {
    margin-left: 0;
}

#post-date {
    margin-left: 5.4px;
}

.author_avatar {
    margin: 0;
    padding: 0;
    border-radius: 50%;
    transform: scale(0.6);
}

.feedbackListSubtitle {
    @include center();
    flex-wrap: wrap;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-5);
    .feedbackManage {
        order: 3;
    }
    .comment_vote {
        order: 4;
    }
}

.comment_actions {
    border-bottom: 1px solid var(--themeColor);
}

.comment_vote a {
    padding-left: 5.4px;
}

#blog-comments-placeholder br,
#comment_pager_top {
    display: none;
}

#post-comments-list {
    margin-top: 21.6px;
    width: 100%;
}

.custom-comment-avatar {
    align-self: baseline;
}

.avatar {
    border: 1px solid #eee;
    border-radius: 50%;
    transform: scale(0.7);
}

// 分页器
#homepage_top_pager {
    margin-top: 10px;
}

.topicListFooter {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0 27px;
    #nav_next_page,
    .pager {
        a {
            color: #fff;
            background-color: #45aaf2;
            border-radius: 2px;
            border: none;
            &:hover {
                background-color: var(--themeColor);
                transition: all 0.2s;
            }
        }
    }
    #nav_next_page {
        a {
            padding: 6px 15px;
        }
    }
    .pager {
        a {
            padding: 2px 12px;
        }
    }
    #nav_next_page {
        display: flex;
        justify-content: center;
        margin: 10px 0;
    }
    .pager {
        @include center(all);
        color: var(--themeColor);
    }
}

.feedbackListSubtitle > a:last-of-type {
    color: #00a1d6;
    order: 1;
}

.feedbackListSubtitle > a:last-of-type:hover {
    color: var(--themeColor);
    transition: all 0.2s;
}

.feedbackManage {
    margin-right: 10.8px;
    order: 3;
}

.comment_vote {
    font-size: 12px;
    color: #999;
}

#ad_t2 {
    margin: 21.6px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #fff;
    border-radius: 3px;
    br {
        display: none;
    }
    a {
        filter: brightness(0.9);
        border-radius: 3px;
        margin-right: 0;
        background-color: var(--background-e);
        color: var(--text-3);
        @include text-over();
        &:not(:nth-child(1)) {
            margin-top: 5px;
        }
    }
}

#under_post_news,
#under_post_kb,
#cnblogs_c1,
#cnblogs_c2 {
    display: none;
}

/* 历史上的今天 */
#HistoryToday {
    display: none;
}

@import './index.m.scss';
